package ${package.Mapper};

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ${package.Entity}.${entity};
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface ${table.mapperName} extends BaseMapper<${entity}> {

    /**
    * 查询当前表是否存在某个字段（列）。若存在，返回数目；若不存在，返回0。
    * @param field 字段名
    */
    @Select("select count(*) from information_schema.columns where table_schema = 'yblog' and table_name = 'user' and column_name = ${r'#{field}'};")
    int existsColumn( @Param("field") String field);

}
